<template>
  <div>
    <el-button  @click="show" v-permission="{action:'add',effect:'disabled'}">热卖</el-button>
    <el-table ref="table" :data="tableData" stripe style="width: 100%" border>
      <el-table-column label="编号" prop="shopId" align="center" />
      <el-table-column label="名称" prop="shopName" align="center" />
      <el-table-column label="商品价格" prop="shopVolume" align="center" />
      <el-table-column
        label="地址"
        prop="shopAddress"
        :show-overflow-tooltip="true"
        align="center"
      />
      <el-table-column label="生产日期" prop="shopDate" align="center" />
      <el-table-column label="商家联系方式" prop="shopPhone" align="center" />
      <el-table-column label="推荐指数" prop="shopStart" align="center" />
      <el-table-column label="操作" align="center">
        <template slot-scope="scope">
          <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">
            编辑
          </el-button>
          <el-button
            size="mini"
            type="danger"
            @click="handleDelete(scope.$index, scope.row)"
          >
            删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import request from "../../utils/request";
export default {
  name: "category",
  data() {
    return {
      tableData: [],
    };
  },
  created() {
    // this.getTabaleList()
  },
  methods: {
    show() {
      this.getTabaleList();
    },
    async getTabaleList() {
      const res = await request({
        url: "/tabList",
        method: "get",
      });
      this.tableData = res.data.data;
    },
  },
};
</script>

<style scoped></style>
